//
//  CourseVideoModel.m
//  网易公开课项目
//
//  Created by 林 艺 on 13-11-12.
//  Copyright (c) 2013年 Marklin. All rights reserved.
//

#import "CourseVideoModel.h"

@implementation CourseVideoModel

-(void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.commentid forKey:@"kVideoListCommentid"];
    [aCoder encodeObject:self.imgpath forKey:@"kVideoListImgpath"];
    [aCoder encodeObject:self.iosshow forKey:@"kVideoListIosshow"];
    [aCoder encodeObject:self.m3u8size forKey:@"kVideoListM3u8size"];
    [aCoder encodeObject:self.m3u8sizeOrigin forKey:@"kVideoListM3u8sizeOrigin"];
    [aCoder encodeObject:self.mid forKey:@"kVideoListMid"];
    [aCoder encodeObject:self.mlength forKey:@"VideoListMlength"];
    [aCoder encodeObject:self.mp4size forKey:@"kVideoListMp4size"];
    [aCoder encodeObject:self.mp4sizeOrigin forKey:@"kVideoListMp4sizeOrigin"];
    [aCoder encodeObject:self.pnumber forKey:@"kVideoListPnumber"];
    [aCoder encodeObject:self.protoVersion forKey:@"kVideoListProtoVersion"];
    [aCoder encodeObject:self.repovideourl forKey:@"kVideoListRepovideourl"];
    [aCoder encodeObject:self.repovideourlmp4 forKey:@"kVideoListRepovideourlmp4"];
    [aCoder encodeObject:self.subtitle forKey:@"kVideoListSubtitle"];
    [aCoder encodeObject:self.subtitleLanguage forKey:@"kVideoListSubtitleLanguage"];
    [aCoder encodeObject:self.title forKey:@"kVideoListTitle"];
    [aCoder encodeObject:self.weburl forKey:@"kVideoListWeburl"];
    [aCoder encodeInteger:self.isSelectedToDownload forKey:@"kVideoListIsSelectedToDownload"];
    [aCoder encodeInteger:self.isDownloaded forKey:@"kVideoListIsDownload"];
    [aCoder encodeInteger:self.isDownloading forKey:@"kVideoListIsDownloading"];
    [aCoder encodeFloat:self.lastPlayTime forKey:@"kVideoListLastPlayTime"];
    [aCoder encodeObject:self.localPlayPath forKey:@"kVideoListLocalPlayPath"];
    [aCoder encodeInteger:self.isDownloadPause forKey:@"kVideoListIsDownloadPause"];
    [aCoder encodeFloat:self.downloadProgress forKey:@"kVideoListDownloadProgress"];
}

-(id)initWithCoder:(NSCoder *)aDecoder
{    
    if (self = [super init]) {
        self.commentid = [aDecoder decodeObjectForKey:@"kVideoListCommentid"];
        self.imgpath = [aDecoder decodeObjectForKey:@"kVideoListImgpath"];
        self.iosshow = [aDecoder decodeObjectForKey:@"kVideoListIosshow"];
        self.m3u8size = [aDecoder decodeObjectForKey:@"kVideoListM3u8size"];
        self.m3u8sizeOrigin = [aDecoder decodeObjectForKey:@"kVideoListM3u8sizeOrigin"];
        self.mid = [aDecoder decodeObjectForKey:@"kVideoListMid"];
        self.mlength = [aDecoder decodeObjectForKey:@"VideoListMlength"];
        self.mp4size = [aDecoder decodeObjectForKey:@"kVideoListMp4size"];
        self.mp4sizeOrigin = [aDecoder decodeObjectForKey:@"kVideoListMp4sizeOrigin"];
        self.pnumber = [aDecoder decodeObjectForKey:@"kVideoListPnumber"];
        self.protoVersion = [aDecoder decodeObjectForKey:@"kVideoListProtoVersion"];
        self.repovideourl = [aDecoder decodeObjectForKey:@"kVideoListRepovideourl"];
        self.repovideourlmp4 = [aDecoder decodeObjectForKey:@"kVideoListRepovideourlmp4"];
        self.subtitle = [aDecoder decodeObjectForKey:@"kVideoListSubtitle"];
        self.subtitleLanguage = [aDecoder decodeObjectForKey:@"kVideoListSubtitleLanguage"];
        self.title = [aDecoder decodeObjectForKey:@"kVideoListTitle"];
        self.weburl = [aDecoder decodeObjectForKey:@"kVideoListWeburl"];
        self.isSelectedToDownload = [aDecoder decodeIntegerForKey:@"kVideoListIsSelectedToDownload"];
        self.isDownloaded = [aDecoder decodeIntegerForKey:@"kVideoListIsDownload"];
        self.isDownloading = [aDecoder decodeIntegerForKey:@"kVideoListIsDownloading"];
        self.lastPlayTime = [aDecoder decodeFloatForKey:@"kVideoListLastPlayTime"];
        self.localPlayPath = [aDecoder decodeObjectForKey:@"kVideoListLocalPlayPath"];
        self.isDownloadPause = [aDecoder decodeIntegerForKey:@"kVideoListIsDownloadPause"];
        self.downloadProgress = [aDecoder decodeFloatForKey:@"kVideoListDownloadProgress"];
    }
    return self;
}


@end
